<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/5/3
  Time: 11:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../../common/web_top.jsp" %>

<div ng-include="finance" class="includeStyle ">

    <div class="bgSortScroll">
        <!-- ngIf: HbHr.hr149 -->
        <%--主界面div--%>
        <div class="main-content public-bgContent" ng-if="HbHr.hr149">
            <!--表单搜索-->
            <div class="public-bgDate">
        <span>
			<input type="text" autocomplete="off" id="start_time" ng-model="param.start_time" ng-focus="remHight()"
                   ng-class="{'error':redErr.dateTime}" placeholder="开始时间"
                   class="ng-pristine ng-untouched ng-valid ng-empty datepicker">
			<i class="iconfont icon-riqi"></i>
		</span>
                <em>
                    ~

                </em>
                <span>
			<input type="text" autocomplete="off" id="end_time" ng-model="param.end_time" ng-focus="remHight()"
                   ng-class="{'error':redErr.dateTime}" placeholder="结束时间"
                   class="ng-pristine ng-untouched ng-valid ng-empty datepicker">
			<i class="iconfont icon-riqi"></i>
		</span>
                <div class="se-re">
                    <select id="seleNames" ng-model="param.type" ng-class="{'error':redErr.seleName}"
                            ng-focus="remHight()" ng-change="changeName()"
                            class="ng-pristine ng-untouched ng-valid ng-empty">
                        <option value="" selected="selected">选择字段</option>
                        <option value="1">借款编号</option>
                        <option value="2">客户姓名</option>
                        <option value="3">手机号码</option>
                        <option value="4">身份证号码</option>
                        <option value="5">业务员姓名</option>
                    </select>
                    <span class="se-po"></span>
                </div>
                <span>
			<input type="text" autocomplete="off" id="inputNames" placeholder="请输入关键字" ng-focus="remHight()"
                   ng-model="param.name"
                   class="ng-pristine ng-untouched ng-valid ng-empty">
		</span>
                <div class="se-re">
                    <select id="at_id"
                            class="headData_select ng-pristine ng-untouched ng-valid ng-empty">
                    </select>
                    <script type="text/x-handlebars-template" id="at_id_tpl">
                        <option value="">分期</option>
                        {{#each .}}
                        <option value="{{id}}" data-num="{{num}}">{{atName}}</option>
                        {{/each}}
                    </script>
                    <span class="se-po"></span>
                </div>
                <div class="se-re">
                    <select ng-model="param.loan_way" class="ng-pristine ng-untouched ng-valid ng-empty loanWay_select">
                        <option value="" selected="selected">贷款方式</option>
                    </select>
                    <span class="se-po"></span>
                    <script type="text/x-handlebars-template" id="loanMethod_list_tpl">
                        {{#each content}}
                        <option value="{{id}}">{{name}}</option>
                        {{/each}}
                    </script>
                </div>
                <div class="se-re">
                    <select id="product_choose_list" class="ng-pristine ng-untouched ng-valid ng-empty">
                        <option value="">选择产品</option>
                        <%--<option value="1">按揭短拆</option>
                        <option value="2">红本抵押</option>
                        <option value="3">红本质押</option>--%>
                    </select>
                    <span class="se-po"></span>
                </div>
                <div id="role_list" style="display: inline-block"></div>
                <script type="x-handlebar-template" id="role_list_tpl">
                    <div class="se-re">
                        <select ng-options="c.id as c.realName for c in salesman.content" ng-model="param.roleId"
                                class="ng-pristine ng-untouched ng-valid ng-empty role_select">
                            <option value="" class="" selected="selected">业务员</option>
                            {{#each content}}
                            <option label="{{realName}}" value="{{id}}">{{realName}}</option>
                            {{/each}}

                        </select>
                        <span class="se-po"></span>
                    </div>
                </script>
                <button ng-click="btn(1)" class="serach_waitingList">
                    <i class="iconfont icon-sousuo"></i>
                </button>
            </div>
            <!--提示操作-->
            <div class="public-bghint">
                <span ng-click="show()" style="cursor: pointer;">提示操作</span>
                <i class="iconfont icon-icon-copy-copy"></i>
                <span class="calNum">筛选<span class="result " id="total">0</span>条结果</span>
            </div>
            <ul class="public-ulList" ng-show="financeShow">
                <li>显示拥有该栏目管理权限的数据</li>
                <li>拥有权限的管理员会显示对应的操作按钮；</li>
                <li>如果是第三方收款，则不显示收款信息。</li>
            </ul>
            <div style="height: 20px;"></div>
            <div class="table-scroll">
                <!--tabel 列表-->
                <table class="table public-table PoInput">
                    <thead>
                    <tr>
                        <td>全选</td>
                        <td>放款日期</td>
                        <td>借款编号</td>
                        <td>所属产品</td>
                        <td>客户姓名</td>
                        <td>收款对象</td>
                        <td>收款帐号</td>
                        <td>收款姓名</td>
                        <td>银行名称</td>
                        <td>期数</td>
                        <td>借款金额</td>
                        <td>放款金额</td>
                        <!-- <td>业务员</td> -->
                        <!-- <td>部门</td> -->
                        <td>是否参股</td>
                        <td>状态</td>
                        <td>操作</td>
                    </tr>
                    </thead>
                    <tbody id="loan_waiting_list">
                    </tbody>
                    <script type="x-handlebars-template" id="loan_waiting_list_tpl">
                        {{#if content.content.list}}
                        {{#each content.content.list}}
                        <tr ng-repeat="i in data.content.list" ng-click="F.tabClick($event)"
                            class="table-tr-hover ">
                            <td><input type="checkbox" name="ch_id" value="{{id}}" data-taskid="{{task_id}}" data-nodeid="{{node_id}}"></td>
                            <td class="">{{loan_time}}</td>
                            <td class="">{{loan_number}}</td>
                            <td class="">{{product_name}}</td>
                            <td class="">{{personal_name}}</td>
                            <td class="">
                                {{#IF_EQ payment_object 2}}
                                第三方
                                {{else}}
                                客户
                                {{/IF_EQ}}
                            </td>
                            <td class="">{{account}}</td>
                            <td class="">{{payee}}</td>
                            <td class="">{{bank}}</td>
                            <td class="">{{#IF_EQ repayment_way '4'}}{{#if at_id}}{{at_id}}天{{/if}}{{else}}{{term_name}}{{/IF_EQ}}</td>
                            <td class="">￥{{#thounsandBit apply_money}}{{/thounsandBit}}</td>
                            <td class="">￥{{#thounsandBit loan_amount}}{{/thounsandBit}}</td>

                            <td class="">
                                {{#if share_name}}
                                是
                                {{else}}
                                否
                                {{/if}}
                            </td>
                            <td class="">{{s_name}}</td>
                            <td>
                                <div class="se-re sel-blue">
                                    <select ng-click="F.stopPropagation($event)" data-fluntype="{{flun_type}}"
                                            data-id="{{id}}" data-productid="{{product_id}}"
                                            data-taskid="{{task_id}}" data-nodeid="{{node_id}}"
                                            data-adminname="{{admin_name}}" data-loanway="{{loan_way}}"
                                            data-loan_type="{{loan_type}}"
                                            class="operation_list tabHint tt713 ng-not-empty"
                                            ng-model="selectType.default" ng-change="F.selectQuery('tt713')">
                                        <option value="-1" selected>选择操作</option>
                                        <!-- ngIf: HbHr.hr150 -->
                                        {{#each ../fourthMenus}}
                                        <option value="{{key}}">{{name}}</option>
                                        <%--<option ng-if="HbHr.hr150" value="1" path="common" data-type="1"
                                                data-id="{{id}}"
                                                data-productid="{{product_id}}"
                                                params="orderShow"
                                                param="id:713,s_id:12,orderHead:waitingLoan,isReimbursement:true"
                                                class="">查看详情
                                        </option><!-- end ngIf: HbHr.hr150 -->
                                        <!-- ngIf: HbHr.hr151 -->
                                        <option ng-if="HbHr.hr151" data-id="{{id}}" value="2" path="finance"
                                                params="soonloan"
                                                param="id:713" class="">马上放款
                                        </option><!-- end ngIf: HbHr.hr151 -->
                                        <!-- ngIf: HbHr.hr357 -->
                                        <option ng-if="HbHr.hr357" value="6" path="loanIng" params="orderReturn"
                                                param="id:713,pid:,,nowPage:waitingLoan" class="">退回订单
                                        </option><!-- end ngIf: HbHr.hr357 -->--%>
                                        {{/each}}
                                    </select>
                                    <span class="se-po-blue"></span>
                                </div>
                                <!-- ngIf: HbHr.hr258 -->
                                <button id='{{id}}' class="operations_record tabHint btnQuery713"
                                        path="loanBefore">
                                    操作记录
                                </button><!-- end ngIf: HbHr.hr258 -->
                            </td>
                        </tr>
                        {{/each}}
                        {{else}}
                        <!-- ngRepeat: i in data.content.list -->
                        <!-- ngIf: data.content.list.length ==0 -->
                        <tr ng-if="data.content.list.length ==0" class="">
                            <td colspan="16">暂时找不到数据</td>
                        </tr><!-- end ngIf: data.content.list.length ==0 -->
                        {{/if}}
                    </script>


                    <tfoot class="public-botPage">
                    <tr>
                        <td>
                            <!-- 全选反选  -->
                            <input type="checkbox" name="ch_id_all">
                        </td>
                        <td colspan="15">
                            <div class="public-botPage-left">
							<span>
								<span>全选</span>
							</span>
                                <div class="se-re">
                                    <select class="tabHint supportc ng-pristine ng-untouched ng-valid ng-not-empty"
                                            ng-model="selectType.default"
                                            ng-change="selectQuery('supportc','ch_id')">
                                        <option value="-1" selected="selected">批量操作</option>
                                        <!-- ngIf: HbHr.hr151 -->
                                        <option value="批量退回" path="finance" params="soonLoan" ng-if="HbHr.hr151"
                                                class="">批量退回
                                        </option><!-- end ngIf: HbHr.hr151 -->
                                    </select>
                                    <span class="se-po"></span>
                                </div>
                            </div>
                            <div class="page-container loan-page-container" style="float: right; padding: 15px 0;"></div>
                        </td>
                    </tr>
                    </tfoot>
                </table>
                <!--底部操作-->
            </div>
        </div><!-- end ngIf: HbHr.hr149 -->
    </div>
</div>

<div class="winBox contract_winBox" style="display: none;">
    <div class="winBox1">
        <div class="winBox2 " style="">
            <div class="contrtsign" style="">
                <!-- 头部 -->
                <div class="headerBox">
                    <span class="headerSpan">马上放款</span>
                    <i class="iconfont icon-wrong headerIcon" ng-click="F.showWin('hide')"></i>
                </div>
                <div class="resultBox">
                    <div class="centerBox" style="height:500px;">
                        <div class="resultPadd" id="contract_waiting_list">
                            <table class="resultTab" style="margin-top: 20px;">
                                <tbody id="special_list">

                                </tbody>
                            </table>
                            <div class="beizhu">操作备注：</div>
                            <textarea id="loanRemark"></textarea>
                            <!-- tab列表结束
                        <!-- 底部 -->
                            <div class="deleFooter">
                                <div class="deleBtn">
                                    <button class="sureLoan">确认放款</button>
                                </div>
                                <div class="zishu">
                                    <i id="zishuxians">200</i>字
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="x-handlebars-template" id="contract_management_tpl">
    <table class="resultTab cm" style="margin-top:22px;">
        <tbody>
        <tr>
            <td class="beizhu"><span></span>借款金额：</td>
            <td class="unload">
                ￥{{#thounsandBit map.apply_money}}{{/thounsandBit}}
            </td>
        </tr>
        <tr>
            <td class="beizhu"><span></span>放款金额：</td>
            <td class="unload">
                {{#IF_EQ loan_type 1}}￥{{#thounsandBit map.apply_money}}{{/thounsandBit}}{{else}}￥{{#substraction map.apply_money map.comprehensive}}{{/substraction}}{{/IF_EQ}}
            </td>
        </tr>
        <tr>
            <td class="beizhu"><span></span>放款类型：</td>
            <td class="unload">
                {{#IF_EQ loan_type 1}}整额放款{{else}}扣除费用放款{{/IF_EQ}}
            </td>
        </tr>
        {{#IF_EQ loan_type 2}}
        <tr>
            <td style="background: #fff;text-align: left;padding-left: 20px;" colspan="2">
                公式 : 放款金额=借款金额-利息费{{#each feeMap}}-{{name}}{{/each}}-保证金
            </td>
        </tr>
        {{/IF_EQ}}
        </tbody>
    </table>
    {{#IF_EQ loan_type 2}}
    <table class="dataListTab D-loan-table cm">
        <thead>
        <tr>
            <td style="width: 0;">利息</td>
            {{#each feeMap}}
            <td>{{name}}</td>
            {{/each}}
            <td>保证金</td>
            <td>小计</td>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td class="">￥{{#thounsandBit map.is_moth_repayment_rate}}{{/thounsandBit}}</td>
            {{#each feeMap}}
            <td>￥{{#fee fee type ../map.apply_money}}{{/fee}}</td>
            {{/each}}
            <td class="">￥{{#thounsandBit map.depositCash}}{{/thounsandBit}}</td>
            <td>￥{{#thounsandBit map.comprehensive}}{{/thounsandBit}}</td>
        </tr>
        </tbody>
    </table>
    {{/IF_EQ}}
</script>

<script type="x-handlebars-template" id="special_list_tpl">
    <tr>
        <td class="beizhu"><span></span>付款对象：</td>
        <td>
            <div>{{map_payee.payee}}, {{map_payee.account}},{{map_payee.bank}}</div>
        </td>
    </tr>
    <tr>
        <td class="beizhu"><span></span>参股信息：</td>
        <td>
            <div style="line-height: 25px" ng-repeat="item in map_share">
                {{#if map_share}}
                {{#each map_share}}
                <span ng-if="item.ratio && item.name">{{name}}, 占股比例:{{ratio}}% ;</span>

                {{/each}}
                {{else}}
                <span ng-if="!map_share[0].ratio || !map_share[0].name">未参股</span>
                {{/if}}
            </div>
        </td>
    </tr>
    <tr>
        <td class="beizhu"><span></span>文员备注：</td>
        <td class="unload">
            <span>{{map.remark}}</span>
        </td>
    </tr>
    <tr>
        <td class="beizhu"><span></span>图片上传：</td>
        <td class="unload" style="">
            <em id="imgTerm_0" style="margin-top: 14px" class="viewPic" data-id="放款">上传图片</em>
            <div class="imgArr minImg" style="margin-top:10px">
                <span style="display: none" class="_pre " ng-if="item.isImg" ng-click="_pre(key)"></span>
                <div class="cover" style="overflow-y: hidden;
    height: 70px;
    margin: 0 24px;">
                    <div id="gallery7" attachid="放款" style="position: relative; left: 0;">
                    </div>
                </div>
                <span style="display: none" class="_next " ng-if="item.isImg" ng-click="_next(key)"></span>
            </div>
        </td>
    </tr>
</script>


<div class="winBox back_order_winBox">
    <!-- 加载弹窗盒子容器 -->
    <!-- ngInclude: box -->
    <div class="winBox1 " ng-include="box"><!-- 说明：弹窗 -->
        <div class="winBox3 ">
            <div class="payer">

                <!-- 头部 -->
                <div class="headerBox">
                    <span class="headerSpan">退回订单</span>
                    <i class="iconfont icon-wrong headerIcon" ng-click="F.showWin('hide')"></i>
                </div>
                <div class="resultBox">
                    <div class="centerBox">
                        <div class="resultPadd">
                            <div class="deleteTit">
                                <span class="first"><i class="iconfont icon-tips2"></i></span>
                                <span>您确定要退回订单？</span>
                            </div>
                            <!-- tab列表结束 -->
                            <!-- 底部 -->
                            <div class="deleFooter" style="padding-top: 0;">
                                <div class="beizhu assBeizhu"><span>*</span>备注</div>
                                <textarea ng-focus="remHight()" ng-class="{'error':redErr.reason}"
                                          ng-model="param.reason" data-tag="textLength" showtag="zishuxians"

                                          class="backRemark ng-pristine ng-untouched ng-valid ng-empty ng-valid-maxlength"></textarea>
                                <div class="deleBtn">
                                    <button class="backProcess" style="background: #E55A5B;" ng-click="queding()">确定退回
                                    </button>
                                </div>
                                <div class="zishu">
                                    <i id="zishuxians">200</i>字
                                </div>
                            </div>
                        </div>
                    </div>
                </div>


            </div>
        </div>
    </div>
</div>

<link href="static/css/viewer.css" rel="stylesheet"/>
<script type="text/javascript" src="static/js/jquery-plugin/viewer-fake.js?_v=190102162154"></script>
<script type="text/javascript" src="static/js/jquery-plugin/jpager.js?_v=190102162154"></script>
<script type="text/javascript" src="static/plugins/ueditor/ueditor.config.js?_v=190102162154"></script>
<script type="text/javascript" src="static/plugins/ueditor/ueditor.all.js?_v=190102162154"></script>
<script type="text/javascript" src="static/js/page/finance/loan_waiting.js?_v=190102162154"></script>

<%@include file="../../common/web_bottom.jsp" %>
